package day3

class PersonClass(val name:String, val age:Int) {
    println("hello world")
    println("name:" + name +"age" + age)

    def this(name:String, age:Int, sex:String){
      this(name, age)
      println(s"sex:${sex}")
    }

    def this(name:String, age:Int, sex:String, addr:String){
      this(name, age, sex)
      println(s"addr:${addr}")
    }
}


object  Person777{
  def main(args: Array[String]): Unit = {
    val tom = new PersonClass("Tom", 40, "nan", "北京")
  }
}